package com.sugon.modules.sys.consts;

/**
 * @Description: 通用常量
 * @author: YuXD
 */
public class CommonConstant {

    /**
     * CgForm通用匹配路径
     */
    public static final String CG_FORM_COMMON_MATCH_URL = "/online/cgformList/";

    /**
     * CgForm模板路径2
     */
    public static final String CG_FORM_COMMON_CGREPORT_URL = "/online/cgreport/";

    /**
     * CgForm模板路径
     */
    public static final String OA_WORK_FLOW_TEMPLATE_PATH = "{}-{}-{}";


    /**
     * CgForm模板路径
     */
    public static final String CG_FORM_TEMPLATE_PATH = "/jeecg/code-template-online";

    /**
     * 用户状态：启用
     */
    public static final Integer USER_STATUS_NORMAL = 1;

    /**
     * 用户状态：禁用
     */
    public static final Integer USER_STATUS_DISABLE = 0;


    /**
     * 正常状态
     */
    public static final Integer STATUS_NORMAL = 0;

    /**
     * 禁用状态
     */
    public static final Integer STATUS_DISABLE = -1;

    /**
     * 删除标志
     */
    public static final Integer DEL_FLAG_1 = 1;

    /**
     * 未删除标志
     */
    public static final Integer DEL_FLAG_0 = 0;

    /**
     * 系统日志类型： 登录
     */
    public static final int LOG_TYPE_1 = 1;

    /**
     * 系统日志类型： 操作
     */
    public static final int LOG_TYPE_2 = 2;

    /**
     * 系统日志类型： 远程访问、接口调用或流程审批
     */
    public static final int LOG_TYPE_3 = 3;

    /**
     * 操作客户端： 电脑端
     */
    public static final String OPERATE_CLIENT_PC = "PC";

    /**
     * 操作客户端： 移动端
     */
    public static final String OPERATE_CLIENT_APP = "APP";

    /**
     * 操作日志类型： 查询
     */
    public static final int OPERATE_TYPE_1 = 1;

    /**
     * 操作日志类型： 添加
     */
    public static final int OPERATE_TYPE_2 = 2;

    /**
     * 操作日志类型： 更新
     */
    public static final int OPERATE_TYPE_3 = 3;

    /**
     * 操作日志类型： 删除
     */
    public static final int OPERATE_TYPE_4 = 4;

    /**
     * 操作日志类型： 倒入
     */
    public static final int OPERATE_TYPE_5 = 5;

    /**
     * 操作日志类型： 导出
     */
    public static final int OPERATE_TYPE_6 = 6;

    /**
     * 操作日志类型： 接口调用
     */
    public static final int OPERATE_TYPE_7 = 7;


    /**
     * {@code 500 Server Error} (HTTP/1.0 - RFC 1945)
     */
    public static final Integer SC_INTERNAL_SERVER_ERROR_500 = 500;

    /**
     * 需要执行重定向操作
     */
    public static final Integer SC_REDIRECT_302 = 302;

    /**
     * {@code 200 OK} (HTTP/1.0 - RFC 1945)
     */
    public static final Integer SC_OK_200 = 200;

    /**
     * {@code 200 OK} (HTTP/1.0 - RFC 1945)
     * 字符串格式的200 状态码
     */
    public static final String SC_OK_200_STR = "200";

    /**
     * 访问权限认证未通过 510
     */
    public static final Integer SC_JEECG_NO_AUTHZ = 510;

    /**
     * 登录用户Shiro权限缓存KEY前缀
     */
    public static String PREFIX_USER_SHIRO_CACHE = "shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:";
    /**
     * 登录用户Token令牌缓存KEY前缀
     */
    public static final String PREFIX_USER_TOKEN = "prefix_user_token_";
//    /** Token缓存时间：3600秒即一小时 */
//    int  TOKEN_EXPIRE_TIME  = 3600;

    /**
     * 登录二维码
     */
    public static final String LOGIN_QRCODE_PRE = "QRCODELOGIN:";
    public static final String LOGIN_QRCODE = "LQ:";
    /**
     * 登录二维码token
     */
    public static final String LOGIN_QRCODE_TOKEN = "LQT:";


    /**
     * 0：一级菜单
     */
    public static final Integer MENU_TYPE_0 = 0;
    /**
     * 1：子菜单
     */
    public static final Integer MENU_TYPE_1 = 1;
    /**
     * 2：按钮权限
     */
    public static final Integer MENU_TYPE_2 = 2;

    /**
     * 阅读状态（0未读，1已读）
     */
    public static final String HAS_READ_FLAG = "1";
    public static final String NO_READ_FLAG = "0";

    /**
     * 状态(0无效1有效)
     */
    public static final String STATUS_0 = "0";
    public static final String STATUS_1 = "1";

    /**
     * 消息类型1:通知公告2:系统消息
     */
    public static final String MSG_CATEGORY_1 = "1";
    public static final String MSG_CATEGORY_2 = "2";

    /**
     * 是否配置菜单的数据权限 1是0否
     */
    public static final Integer RULE_FLAG_0 = 0;
    public static final Integer RULE_FLAG_1 = 1;

    /**
     * 是否用户已被冻结 1正常(解冻) 0冻结
     */
    public static final Integer USER_UNFREEZE = 1;
    public static final Integer USER_FREEZE = 0;

    /**
     * 字典翻译文本后缀
     */
    public static final String DICT_TEXT_SUFFIX = "_dictText";

    /**
     * 文件上传类型（本地：local，Minio：minio，阿里云：alioss）
     */
    public static final String UPLOAD_TYPE_LOCAL = "local";
    public static final String UPLOAD_TYPE_MINIO = "minio";

    /**
     * 员工身份 （1:普通员工  2:上级）
     */
    public static final Integer USER_IDENTITY_1 = 1;
    public static final Integer USER_IDENTITY_2 = 2;

    /**
     * sys_quartz_job 表 job_class_name 唯一键索引
     */
    public static final String SQL_INDEX_UNIQ_JOB_CLASS_NAME = "uniq_job_class_name";
    /**
     * sys_position 表 code 唯一键索引
     */
    public static final String SQL_INDEX_UNIQ_CODE = "uniq_code";
    /**
     * sys_role 表 code 唯一键索引
     */
    public static final String SQL_INDEX_UNIQ_SYS_ROLE_CODE = "uniq_sys_role_role_code";
    /**
     * sys_depart 表 code 唯一键索引
     */
    public static final String SQL_INDEX_UNIQ_DEPART_ORG_CODE = "uniq_depart_org_code";
    /**
     * sys_category 表 code 唯一键索引
     */
    public static final String SQL_INDEX_UNIQ_CATEGORY_CODE = "idx_sc_code";

    /**===============================================================================================*/
    /**
     * ::非常重要::
     * 注意：这四个常量值如果修改，需要与 jeecg-boot-starter/jeecg-boot-common/org.jeecg.config.FeignConfig 类中的值保持一致。
     */
    public static final String X_ACCESS_TOKEN = "X-Access-Token";
    public static final String X_SIGN = "X-Sign";
    public static final String X_TIMESTAMP = "X-TIMESTAMP";
    /**
     * 租户 请求头
     */
    public static final String TENANT_ID = "tenant-id";
    /**
     * ===============================================================================================
     */

    public static final String TOKEN_IS_INVALID_MSG = "Token失效，请重新登录!";
    public static final String X_FORWARDED_SCHEME = "X-Forwarded-Scheme";

    /**
     * 微服务读取配置文件属性 服务地址
     */
    public static final String CLOUD_SERVER_KEY = "spring.cloud.nacos.discovery.server-addr";

    /**
     * ONLINE 报表权限用 从request中获取地址栏后的参数
     */
    public static final String ONL_REP_URL_PARAM_STR = "onlRepUrlParamStr";

    /**
     * POST请求
     */
    public static final String HTTP_POST = "POST";

    /**
     * PUT请求
     */
    public static final String HTTP_PUT = "PUT";

    /**
     * PATCH请求
     */
    public static final String HTTP_PATCH = "PATCH";

    /**
     * 未知的
     */
    public static final String UNKNOWN = "unknown";

    /**
     * 字符串http
     */
    public static final String STR_HTTP = "http";

    /**
     * String 类型的空值
     */
    public static final String STRING_NULL = "null";

    /**
     * 前端vue3版本Header参数名
     */
    public static final String VERSION = "X-Version";

    /**
     * 存储在线程变量里的动态表名
     */
    public static final String DYNAMIC_TABLE_NAME = "DYNAMIC_TABLE_NAME";
    /**
     * http:// http协议
     */
    public static final String HTTP_PROTOCOL = "http://";

    /**
     * https:// https协议
     */
    public static final String HTTPS_PROTOCOL = "https://";

    /**
     * 部门表唯一key，id
     */
    public static final String DEPART_KEY_ID = "id";
    /**
     * 部门表唯一key，orgCode
     */
    public static final String DEPART_KEY_ORG_CODE = "deptId";

    /**
     * 发消息 会传递一些信息到map
     */
    public static final String NOTICE_MSG_SUMMARY = "NOTICE_MSG_SUMMARY";

    /**
     * 发消息 会传递一个业务ID到map
     */
    public static final String NOTICE_MSG_BUS_ID = "NOTICE_MSG_BUS_ID";

    /**
     * 流程实例ID
     */
    public static final String PROCESS_INSTANCE_ID = "procInstId";
}
